/**
 * 
 */
package valueObjects.game.card.door;




/**
 * This card represents a racecard
 *
 */
public class CharacterRaceCard extends DoorCard{

	private static final long serialVersionUID = 1L;

	public static final String HALBING = "Halbling";
	
	public static final String ZWERG = "Zwerg";
	
	public static final String ELF = "Elf";
	
	public static final String DEFAULT = "Mensch";
	
	private String race;
	
	private short escapeLevel;
	
	private short countOfHandCards;

	/**
	 * Default constructor
	 */
	public CharacterRaceCard(){
		
	}
	
	/**
	 * Constructor with the given race
	 * @param race
	 */
	public CharacterRaceCard(String race){
		this.countOfHandCards = 5;
		this.escapeLevel = 0;
		this.race = race;
	}
	
	/**
	 * Returns the character race of this card
	 * @return <code>String</code> the race
	 */
	public String getRace() {
		return race;
	}

	/**
	 * Sets the race for this card
	 * @param race the race to set
	 */
	public void setRace(String race) {
		this.race = race;
	}

	/**
	 * Returns the escape level of this card
	 * @return the escapeLevel
	 */
	public short getEscapeLevel() {
		return escapeLevel;
	}

	/**
	 * Sets the escape leve for this card
	 * @param escapeLevel the escapeLevel to set
	 */
	public void setEscapeLevel(short escapeLevel) {
		this.escapeLevel = escapeLevel;
	}

	/**
	 * Returns the number of cards one can hold as this race
	 * @return the countOfHandCards
	 */
	public short getCountOfHandCards() {
		return countOfHandCards;
	}

	/**
	 * Sets the number of cards one can hold as this race
	 * @param countOfHandCards the countOfHandCards to set
	 */
	public void setCountOfHandCards(short countOfHandCards) {
		this.countOfHandCards = countOfHandCards;
	}
	
	public String toString() {
		return (this.race + " / " + this.escapeLevel + " / " + this.countOfHandCards);
	}

	@Override
	public String getType() {
		return "characterRace";
	}

	public boolean is(String def) {
		return this.race == def;
	}
	
}
